Permanent magnets can be arranged to create various magnetic field patterns. An example is the Halbach array, in which a number of permanent magnets are arranged adjacent each other, having magnetic fields directions for each permanent magnet arranged in a particular configuration. The permanent magnet array may have an unusual magnetic field pattern, in which the flux lines are concentrated on one side of the array. However, assembling permanent magnets can be a difficult and expensive proposition, and is not practically possible in many applications. It would be useful in numerous applications to achieve similar magnetic field manipulation and flexible control of control of flux directions, without the need to assemble a multitude of permanent magnets.